Termination w.r.t. Q of the following Term Rewriting System could be proven:
Q restricted rewrite system:
The TRS R consists of the following rules:
fib(N) → sel(N, fib1(s(0), s(0)))
fib1(X, Y) → cons(X, n__fib1(Y, add(X, Y)))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
sel(0, cons(X, XS)) → X
sel(s(N), cons(X, XS)) → sel(N, activate(XS))
fib1(X1, X2) → n__fib1(X1, X2)
activate(n__fib1(X1, X2)) → fib1(X1, X2)
activate(X) → X
Q is empty.
↳ QTRS
↳ DirectTerminationProof
Q restricted rewrite system:
The TRS R consists of the following rules:
fib(N) → sel(N, fib1(s(0), s(0)))
fib1(X, Y) → cons(X, n__fib1(Y, add(X, Y)))
add(0, X) → X
add(s(X), Y) → s(add(X, Y))
sel(0, cons(X, XS)) → X
sel(s(N), cons(X, XS)) → sel(N, activate(XS))
fib1(X1, X2) → n__fib1(X1, X2)
activate(n__fib1(X1, X2)) → fib1(X1, X2)
activate(X) → X
Q is empty.
We use [23] with the following order to prove termination.
Lexicographic Path Order [19].
Precedence:
[fib1, 0] > sel2 > activate1 > fib12 > cons2 > s1
[fib1, 0] > sel2 > activate1 > fib12 > nfib12 > s1
[fib1, 0] > sel2 > activate1 > fib12 > add2 > s1